var path = require("path");
var html = require("html-webpack-plugin");
var  VueLoaderPlugin = require('vue-loader/lib/plugin');
module.exports = {
    entry:path.resolve(__dirname,"src/index.js"),
    output: {
        path:path.resolve(__dirname,"dist"),
        filename:"dubble.js"
    },
    plugins :[
        new html ({
            template:path.resolve(__dirname,"src/index.html"),
            filename:"index.html"
        }),
        new VueLoaderPlugin()
    ],
    module:{
        rules:[
            {test:/\.css$/,use:["style-loader","css-loader"]},
            {test:/\.less$/,use:["style-loader","css-loader","less-loader"]},
            {test:/\.scss$/,use:["style-loader","css-loader","sass-loader"]},
            {test:/\.(png|jpg|gif)$/,use:"url-loader?limit=43960"},
             {test: /\.(ttf|eot|svg|woff|woff2)$/,use: 'url-loader'},
            {test: /\.vue$/,use: 'vue-loader'}
        ]
    },
    resolve: {
        alias: {
            'vue$': 'vue/dist/vue.esm.js'
        }
    }
}